<?php

namespace App\Domain\Material\Requests;

use Illuminate\Foundation\Http\FormRequest;

class MaterialEditPost extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'SN' => 'required|string|nullable',
            'distribution_status' => 'required|string|nullable',
            'deliver_status' => 'required|string|nullable',
            'model' => '',
            'warehousing_time' => '',

        ];
    }

    public function messages()
    {
        return [
            'SN.required' => 'SN序列号必填',
            'distribution_status.required' => '配货状态必填',
            'deliver_status.required' => '发货状态必填',
        ];
    }
}
